/*   1:    */ package com.rinsi.app.azsb.azzl.azsqs.zjyqsqs.four;
/*   2:    */ 
/*   3:    */ import com.rinsi.core.CoreCache;
/*   4:    */ import com.rinsi.core.service.CoreSimpleService;
/*   5:    */ import com.rinsi.util.FormaterUtil;
/*   6:    */ import com.rinsi.util.ListUtil;
/*   7:    */ import com.rinsi.util.MapUtil;
/*   8:    */ import java.util.Date;
/*   9:    */ import java.util.HashMap;
/*  10:    */ import java.util.List;
/*  11:    */ import java.util.Map;
/*  12:    */ import org.mybatis.spring.SqlSessionTemplate;
/*  13:    */ import org.springframework.stereotype.Service;
/*  14:    */ 
/*  15:    */ @Service
/*  16:    */ public class ZjyqsqsFourService
/*  17:    */   extends CoreSimpleService
/*  18:    */ {
/*  19:    */   public void afterIndex(Map<String, Object> model, Map<String, Object> rMap)
/*  20:    */   {
/*  21: 23 */     Map<String, Object> params = getParams(model);
/*  22:    */     
/*  23: 25 */     Map<String, Object> config = getConfig(model);
/*  24:    */     
/*  25: 27 */     rMap.putAll(getParams(model));
/*  26:    */     
/*  27: 29 */     rMap.put("ysyjs", getSqlSessionTemplate().selectList("Core.getCodeList", Integer.valueOf(50000204)));
/*  28:    */     
/*  29: 31 */     rMap.put("pcjgs", getSqlSessionTemplate().selectList("Core.getCodeList", Integer.valueOf(50000203)));
/*  30:    */     
/*  31: 33 */     List<Map<String, Object>> modules = CoreCache.getCacheList(MapUtil.getString(params, "UID"), "modules");
/*  32:    */     
/*  33: 35 */     List<Map<String, Object>> sub_rights = ListUtil.subList(modules, "MODULE_NO_PRE='500002'");
/*  34:    */     
/*  35: 37 */     rMap.put("azsbxx", getSqlSessionTemplate().selectOne("azsb.get", params));
/*  36:    */     
/*  37: 39 */     rMap.put("userxx", CoreCache.getCacheMap(MapUtil.getString(params, "UID"), "user"));
/*  38:    */     
/*  39: 41 */     model.put("sub_rights", ListUtil.listToMap(sub_rights, "MODULE_TYPE"));
/*  40:    */     try
/*  41:    */     {
/*  42: 45 */       List<Map<String, Object>> datas = getSqlSessionTemplate().selectList(namespace(config) + ".list", params);
/*  43:    */       
/*  44: 47 */       rMap.put("datas", datas);
/*  45:    */       
/*  46: 49 */       rMap.put("success", Boolean.valueOf(true));
/*  47:    */     }
/*  48:    */     catch (Exception e)
/*  49:    */     {
/*  50: 53 */       rMap.put("success", Boolean.valueOf(false));
/*  51: 55 */       if (MapUtil.getBoolean(rMap, "shoeExMessage").booleanValue()) {
/*  52: 57 */         rMap.put("message", e.getMessage());
/*  53:    */       } else {
/*  54: 61 */         rMap.put("message", "展示数据列表出错！请稍后重试，或联系系统管理员！");
/*  55:    */       }
/*  56: 64 */       rMap.put("ex", e.getMessage());
/*  57:    */       
/*  58: 66 */       e.printStackTrace();
/*  59:    */     }
/*  60:    */   }
/*  61:    */   
/*  62:    */   public Map<String, Object> zwpgSave(Map<String, Object> model)
/*  63:    */   {
/*  64: 74 */     Map<String, Object> rMap = new HashMap();
/*  65:    */     
/*  66: 76 */     Map<String, Object> params = getParams(model);
/*  67:    */     
/*  68: 78 */     Map<String, Object> config = getConfig(model);
/*  69:    */     
/*  70: 80 */     rMap.putAll(getParams(model));
/*  71:    */     try
/*  72:    */     {
/*  73: 84 */       getSqlSessionTemplate().update(namespace(config) + ".update", params);
/*  74:    */       
/*  75: 86 */       rMap.put("success", Boolean.valueOf(true));
/*  76:    */     }
/*  77:    */     catch (Exception e)
/*  78:    */     {
/*  79: 90 */       rMap.put("success", Boolean.valueOf(false));
/*  80: 92 */       if (MapUtil.getBoolean(rMap, "shoeExMessage").booleanValue()) {
/*  81: 94 */         rMap.put("message", e.getMessage());
/*  82:    */       } else {
/*  83: 98 */         rMap.put("message", "展示数据列表出错！请稍后重试，或联系系统管理员！");
/*  84:    */       }
/*  85:101 */       rMap.put("ex", e.getMessage());
/*  86:    */       
/*  87:103 */       e.printStackTrace();
/*  88:    */     }
/*  89:107 */     return rMap;
/*  90:    */   }
/*  91:    */   
/*  92:    */   public Map<String, Object> qzSave(Map<String, Object> model)
/*  93:    */   {
/*  94:112 */     Map<String, Object> rMap = new HashMap();
/*  95:    */     
/*  96:114 */     Map<String, Object> params = getParams(model);
/*  97:    */     
/*  98:116 */     Map<String, Object> config = getConfig(model);
/*  99:    */     
/* 100:118 */     rMap.putAll(getParams(model));
/* 101:    */     try
/* 102:    */     {
/* 103:122 */       getSqlSessionTemplate().update(namespace(config) + ".qzSave", params);
/* 104:    */       
/* 105:124 */       rMap.put("now", FormaterUtil.formatDateValue(new Date(), "yyyy-MM-dd HH:mm:ss"));
/* 106:    */       
/* 107:126 */       rMap.put("success", Boolean.valueOf(true));
/* 108:    */     }
/* 109:    */     catch (Exception e)
/* 110:    */     {
/* 111:130 */       rMap.put("success", Boolean.valueOf(false));
/* 112:132 */       if (MapUtil.getBoolean(rMap, "shoeExMessage").booleanValue()) {
/* 113:134 */         rMap.put("message", e.getMessage());
/* 114:    */       } else {
/* 115:138 */         rMap.put("message", "展示数据列表出错！请稍后重试，或联系系统管理员！");
/* 116:    */       }
/* 117:141 */       rMap.put("ex", e.getMessage());
/* 118:    */       
/* 119:143 */       e.printStackTrace();
/* 120:    */     }
/* 121:147 */     return rMap;
/* 122:    */   }
/* 123:    */ }


/* Location:           D:\Users\Desktop\shanxi\项目\sxazmis\WEB-INF\classes\
 * Qualified Name:     com.rinsi.app.azsb.azzl.azsqs.zjyqsqs.four.ZjyqsqsFourService
 * JD-Core Version:    0.7.0.1
 */